<!DOCTYPE html>
<html lang="en">
   	<head>
		<meta charset="UTF-8">
		<title>登录</title>
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<meta name="keywords" content="这里写关键字">
		<meta name="description" content="这里写页面描述">
		<meta name ="viewport" content ="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> 
		<meta name="format-detection" content="telephone=no,email=no" />
		<link href="fontAwesome/css/font-awesome.min.css" rel="stylesheet">
		<link href="css/common.css" rel="stylesheet">
		<link href="css/sign.css" rel="stylesheet">
		<script type="text/javascript" src="js/jquery.min.js"></script>
	</head>
</head>
<body>
	<div class="container">
		<div class="sign-in">
			<h3>渠道管理</h3>
			<ul class="sign-list">
				<li>
					<div class="sign-list-row">
						<label class="row-title">帐号</label>
						<div class="row-content">
							<input type="text" placeholder="请输入帐号">
							<i class="fa fa-times-circle fa-hidden"></i>
							<i class="fa fa-exclamation-circle"></i>
						</div>
					</div>
				</li>
				<li>
					<div class="sign-list-row">
						<label class="row-title">密码</label>
						<div class="row-content">
							<input type="password" placeholder="请输入密码">
							<i class="fa fa-times-circle "></i>
						</div>
					</div>
				</li>
			</ul>
			<button class="btn btn-sign" id="checkedBtn">登录</button>
		</div>
	</div>
</body>
<script type="text/javascript">
	$(function(){

		// 获取焦点
		$(".row-content input").focus(function(){
			var vaL=$(this).val().length;
			if (vaL>0) {
				$(this).siblings(".fa-times-circle").show();
			};
		})

		$('.row-content input').bind('input propertychange', function() { 
		 	var vaL=$(this).val().length;
			if (vaL>0) {
				$(this).siblings(".fa-times-circle").show();
			}else{
				$(this).siblings(".fa-times-circle").hide();
			};
		});

		$("body").on('touchend','.fa-times-circle',function(){
			$(this).siblings("input").val("");
			$(this).siblings("input").focus();
			return false;
		})
		// 失去焦点
		$(".row-content input").blur(function(){
			$(this).siblings(".fa").hide();
		})

		// 判断账户错误
		$("#checkedBtn").click(function(){
			if(1==1){
				$(".fa-exclamation-circle").show();//账号错误
			}else{
				$(".fa-exclamation-circle").hide();//账号正确
			}
		})

	})
</script>
</html>
